package com.redoor.app.stake.basicdata.service.impl;

import com.redoor.app.stake.auth.commons.DatabaseServiceStatus;
import com.redoor.app.stake.basicdata.dao.SyncServiceFeeModelMapper;
import com.redoor.app.stake.basicdata.model.SyncServiceFeeModel;
import com.redoor.app.stake.basicdata.model.controllerModel.BaseServicefeemodelCriteria;
import com.redoor.app.stake.basicdata.service.SyncServiceFeeModelService;

import com.redoornetwork.framework.mybatis.service.AbstractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by wangjunlei on 2018-03-07 17:06:26.
 */
@Service
public class SyncServiceFeeModelServiceImpl extends AbstractService<SyncServiceFeeModel, String> implements SyncServiceFeeModelService {

    @Autowired
    private SyncServiceFeeModelMapper syncServiceFeeModelMapper;

    @Override
    public List<SyncServiceFeeModel> queryServiceFeeModel(BaseServicefeemodelCriteria criteria) {
        return syncServiceFeeModelMapper.queryServiceFeeModel(criteria);
    }

    @Override
    public SyncServiceFeeModel qryServiceFeeModelById(String modelId) {
        SyncServiceFeeModel syncServiceFeeModel = new SyncServiceFeeModel();
        syncServiceFeeModel.setId(modelId);
        syncServiceFeeModel.setStatus(Integer.valueOf(DatabaseServiceStatus.SERVICE_NORMAL_STATUS.getCode()));
        return this.syncServiceFeeModelMapper.selectOne(syncServiceFeeModel);
    }
}
